import { request } from "@/utils/http";
import type{TrademarkData,ReturnTrademarkData} from "./model/trademarkType"

export default {
  // DELETE /admin/product/baseTrademark/remove/{id}
  remove(id: number) {
    return request.delete<any, null>(
      `admin/product/baseTrademark/remove/${id}`
    );
  },

  // POST /admin/product/baseTrademark/save
  // 新增BaseTrademark
  // PUT /admin/product/baseTrademark/update
  // 修改BaseTrademark
  addOrUpdate(baseTrademark: TrademarkData) {
    if (baseTrademark.id) {
      return request.put<any, null>("/admin/product/baseTrademark/update",baseTrademark);
    } else {
      return request.post<any, null>("/admin/product/baseTrademark/save",baseTrademark);
    }
  },

  // GET /admin/product/baseTrademark/{page}/{limit}
  getPageListInfo(page: number, limit: number) {
    return request.get<any, ReturnTrademarkData>(
      `/admin/product/baseTrademark/${page}/${limit}`
    );
  },
};


